package com.example.kaogong.sys.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @description: 新增试题传输对象
 * @author: 徐文升
 * @create: 2022-03-29 19:43
 **/

@Data
@EqualsAndHashCode
@ApiModel(value = "QuestionDto对象", description = "新增试题传输对象")
public class QuestionDto {

    @NotBlank(message = "题目描述不能为空")
    @ApiModelProperty(value = "题目描述", required = true)
    private String questionDesc;

    @NotNull(message = "题目分数不能为空")
    @ApiModelProperty(value = "分数", required = true)
    private Integer score;

    @NotNull(message = "题目难度不能为空")
    @ApiModelProperty(value = "难度(1-简单，2-中等，3-困难)", required = true)
    private Integer level;

    @NotNull(message = "题目类型不能为空")
    @ApiModelProperty(value = "题目类型(1-单选，2-多选，3-判断题，4-填空题，5-主观论述题)", required = true)
    private Integer questionType;

    @ApiModelProperty(value = "参考答案（1、主观论述题没有参考答案 2、选择题参考答案为选项，多选参考答案直接选项拼接如ABC，判断0/1）")
    private String answer;

    @ApiModelProperty(value = "选择题选项（题目类型为单选和多选时必填）")
    private List<OptionDto> options;
}
